home *** CD-ROM | disk | FTP | other *** search
File List | 1991-07-28 | 6.8 KB | 190 lines |
-
- Motorola DSP56000 Macro Cross Assembler Version 2.02 91-07-28 12:42:02 init.asm Page 1
-
-
-
- 1 page 132,63,1,1
- 2 opt rc
- 4
- 5 ;***************************************************************
- 6 ;* INIT.ASM -- DSP56001 interrupt vector table and DSP CARD 3 *
- 7 ;* initialization code *
- 8 ;* *
- 9 ;* Here are all DSP56001 interrupt vectors and space for *
- 10 ;* interrupt contexts. Also included are initalization code *
- 11 ;* and some stuff for debugging. *
- 12 ;* *
- 13 ;* Copyright (C) 1990, 1991 by Alef Null. All rights reserved. *
- 14 ;* Author(s): Jarkko Vuori, OH2LNS *
- 15 ;* Modification(s): *
- 16 ;***************************************************************
- 17
- 225
- 226 section Vector
- 227 xref sci_rec,sci_xmt,sci_tim
- 228 xref m_rx,m_sr,m_tx,m_ssr,m_srxl
- 229
- 263
- 264 ; Reset vector
- 265 P:0000 org p:i_reset
- 266 P:0000 0AF080 jmp start
- 000000
- 267
- 268 ; SSI receive interrupt
- 269 P:000C org p:i_ssird
- 270 P:000C 085F6F movep x:m_rx,p:(r7)+
- 271 P:000D 000000 nop
- 272
- 273 ; SSI receive interrupt with errors
- 274 P:000E org p:i_ssirde
- 275 P:000E 08676E movep x:m_sr,p:(r7) ; clear ROE
- 276 P:000F 08676F movep x:m_rx,p:(r7)
- 277
- 278 ; SSI transmitter interrupt
- 279 P:0010 org p:i_ssitd
- 280 P:0010 08F4AF movep #0,x:m_tx
- 000000
- 281
- 282 ; SSI transmitter interrupt with errors
- 283 P:0012 org p:i_ssitde
- 284 P:0012 0870AE movep x:m_sr,x:m_tx ; clear TUE
- 00FFEF
- 285
- 286 ; SCI receive interrupt
- 287 P:0014 org p:i_scird
- 288 P:0014 0BF080 jsr sci_rec
- 000000
- 289
- 290 ; SCI receive interrupt with errors
- 291 P:0016 org p:i_scirde
- 292 P:0016 0870B1 movep x:m_ssr,x:m_tx
- 00FFEF
- 293
-
-
- Motorola DSP56000 Macro Cross Assembler Version 2.02 91-07-28 12:42:02 init.asm Page 2
- DSP CARD 3 initialization
-
-
- 294 ; SCI transmitter interrupt
- 295 P:0018 org p:i_scitd
- 296 P:0018 0BF080 jsr sci_xmt
- 000000
- 297
- 298 endsec
- 299
- 300
- 301 section Init
- 302 xdef start
- 303 xref ssi_ini,sci_ini
- 304 xref fft_i
- 305 xref m_loop
- 306 xref m_bcr,m_pcc,m_pcddr,m_pcd,m_ipr
- 307
- 534
- 535 P:0000 org p:
- 536
- 537
- 538 ;****************************
- 539 ;* Start of the program *
- 540 ;****************************
- 541 ; no wait states on external memory
- 542 P:0000 08F4BE start movep #$0000,x:m_bcr ; no wait states
- 000000
- 543
- 544 ; initialize peripherals
- 545 P:0002 0D0000 jsr <ssi_ini
- 546 P:0003 0D0000 jsr <sci_ini
- 547
- 548 ; initialize port C
- 549 P:0004 08F4A1 movep #$01eb,x:m_pcc ; TXD,RXD,SC0,SC2,SCK,SRD,STD
- 0001EB
- 550 P:0006 08F4A3 movep #$0014,x:m_pcddr ; SCLK,SC1 as output
- 000014
- 551 P:0008 08F4A5 movep #$0000,x:m_pcd
- 000000
- 552
- 553 ; initialize status
- 554 movi 0,x:<status
- 557
- 558 ; initialize modules (with external hardware)
- 559 P:000C 0D0000 jsr <fft_i
- 560
- 561 ; start interrupts
- 562 P:000D 08F4BF movep #$b400,x:m_ipr ; SSI=IPL2,SCI=IPL1,HOST=IPL0
- 00B400
- 563 P:000F 00FCB8 andi #$fc,mr ; unmask interrupts
- 564
- 565 ; and jump to the main modem module
- 566 P:0010 0C0000 jmp <m_loop
- 567
- 568 endsec
- 569
- 570
- 571
- 572 ;****************************
-
-
- Motorola DSP56000 Macro Cross Assembler Version 2.02 91-07-28 12:42:02 init.asm Page 3
- DSP CARD 3 initialization
-
-
- 573 ;* STATUS OF THE MODEM *
- 574 ;****************************
- 575
- 576 section Status
- 577
- 578 xdef status
- 579
- 580 X:0000 org x:
- 581
- 582 X:0000 000000 status ds 1
- 583
- 584 endsec
- 585
- 586
- 587 ;****************************
- 588 ;* CONTEX STORE FOR INTS *
- 589 ;****************************
- 590
- 591 section Contexts
- 592 xdef scix,scir,scit
- 593 xdef scixr,scirr,swir
- 594
- 821
- 822 L:0000 org l:
- 823
- 824 scix roomab
- 826 scir roomab
- 828 scit roomab
- 830
- 831 Y:0000 org y:
- 832
- 833 scixr roomr
- 835 scirr roomr
- 837 swir roomr
- 839
- 840 endsec
- 841
- 842 end
- 0 Errors
- 0 Warnings
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-